/*@preserve ***Version 2.10.0*** */ /*@license * Copyright 2002 - 2018 Qualtrics, LLC. * All rights reserved. * * Notice: All code, text, concepts, and other information herein (collectively, the * "Materials") are the sole property of Qualtrics, LLC, except to the extent * otherwise indicated. The Materials are proprietary to Qualtrics and are protected * under all applicable laws, including copyright, patent (as applicable), trade * secret, and contract law. Disclosure or reproduction of any Materials is strictly * prohibited without the express prior written consent of an authorized signatory * of Qualtrics. For disclosure requests, please contact notice@qualtrics.com. */ try { (window["WAFQualtricsWebpackJsonP-cloud-2.10.0"]=window["WAFQualtricsWebpackJsonP-cloud-2.10.0"]||[]).push([[18],{61:function(e,t,n){"use strict";n.r(t);var r=n(3),o=n(4),i=n(27),a=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},u=function(e){var t=e.translations,n=e.translationSettings,u=e.question,s=e.recordResponseAndProceed,c=e.isFollowUp,d=e.preloadRendererForQID,l=a(Object(o.useState)(null),2),f=l[0],b=l[1],p=a(Object(o.useState)(null),2),v=p[0],O=p[1],g=a(Object(o.useState)(null),2),y=g[0],w=g[1],S=y;return null!==y&&f===u.QID&&v!==u.Style&&(w(null),S=null),Object(o.useEffect)((function(){var e=u.Format,t=u.Style;Object(i.a)(e,t).then((function(e){w((function(){return e})),b(u.QID),O(u.Style)}))}),[u]),null!==S&&f===u.QID?Object(r.h)(S,{translations:t,translationSettings:n,question:u,recordResponseAndProceed:s,isFollowUp:c,preloadRendererForQID:d}):Object(r.h)("div",null)},s=n(15),c=n(25);function d(e){window.QSI.dbg.e(e)}var l=n(7),f=n(5),b=Object(o.createContext)(null);var p=n(34),v=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function O(e){var t,n,r;switch(e.questionConfiguration.Format){case"embedded-feedback-question-format-open-text":return(t={})[e.questionConfiguration.SurveyQuestionId]=e.recordedResponse,t;case"embedded-feedback-question-format-points":case"embedded-feedback-question-format-yes-no":default:return(n={})[e.questionConfiguration.SurveyQuestionId]=((r={})[e.recordedResponse]={selected:!0},r),n}}var g=function(e){var t,n,a=e.interceptOptions,g=a.id,y=a.surveyId,w=a.targetURLOrigin,S=Object(f.b)(b),m=S.Questions,j=v(Object(o.useState)(0),2),h=j[0],Q=j[1],I=v(Object(o.useState)(!1),2),C=I[0],R=I[1],q=v(Object(o.useState)(!1),2),k=q[0],P=q[1],D=v(Object(o.useState)(!1),2),E=D[0],F=D[1],x=w+"/DX/PostResponse/?SurveyId="+y+"&InterceptId="+g,T=window.QSI.global.featureFlags["DX.EmbeddedFeedback_NewAPIs"],A=(t=m,n=Object(o.useRef)(),Object(o.useEffect)((function(){n.current=t})),n.current);if(a.isPreview&&A)if(A.length!==m.length)Q(0);else if(A[0].Style!==m[0].Style)Q(0);else for(var L=0;L=N.length?R(!0):(P(!0),Q(o))}else R(!0)}),[N,W,h,E,_]);return C||!W?null:Object(r.h)(u,{translations:X,translationSettings:S.TranslationSettings,question:W.questionConfiguration,recordResponseAndProceed:$,isFollowUp:k,preloadRendererForQID:function(e){if("End"!==e){var t=Z(e);if(!(t>=N.length)){var n=N[t].questionConfiguration,r=n.Format,o=n.Style;Object(i.a)(r,o)}}}})},y=n(33),w=n(13),S=n(32),m=n(8),j=function(e){var t=e.creativeOptions,n=e.interceptOptions,o=t.Insertion,i=o.Selector,a=o.MaxNumberOfInsertions,u=Object(S.a)(t),s=u.Questions[0].Appearance.CustomCSS,c=Object(w.a)(s),d=Object(y.a)(g,n,i,c,a);return Object(r.h)(m.a.Provider,{value:n},Object(r.h)(b.Provider,{value:u},d))},h=n(31);n.d(t,"renderEmbeddedFeedback",(function(){return I}));var Q=function(){return(Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n